package com.taxi.driver.module.vo;

import com.alibaba.fastjson.JSON;
import com.qianxx.utils.TypeUtils;
import com.taxi.driver.data.entity.HomePageOrderEntity;

/**
 * 功能描述：
 */
public class HomePageOrderVO {

    public static HomePageOrderVO createFrom(HomePageOrderEntity entity) {
        if (entity == null) return new HomePageOrderVO();
        String strJson = JSON.toJSONString(entity);
        return JSON.parseObject(strJson, HomePageOrderVO.class);
    }

    public String uuid; // "99d5d783ffc64418a5fda2c891a5a58d",
    public String originAddress; // "中国民生银行(厦门观音山支行)",
    public String destAddress; // "同安小西门(公交站)",
    public Integer typeTime; // 2,
    public Integer typeTrip; // 1,
    public Double totalFare; // null,
    public Long deparTime; // 1487841643000,
    public String actualPasNum; // null,
    public Integer subStatus; // 200

    public long getDepartTime() {
        return TypeUtils.getValue(deparTime);
    }

    public String getOriginAddress() {
        return TypeUtils.getValue(originAddress);
    }

    public String getDestAddress() {
        return TypeUtils.getValue(destAddress);
    }
}
